package com.tencent.sr.iris.activity.service.activity;

import com.tencent.sr.iris.activity.interfaces.request.acticity.ActivityGiftPopupRequest;
import com.tencent.sr.iris.activity.interfaces.request.acticity.AwardConfirmRequest;
import com.tencent.sr.iris.activity.interfaces.response.activity.ActivityGiftPopupResponse;
import com.tencent.sr.iris.activity.repository.entity.TIrisActivityAwardRecordDO;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

public interface IrisActivityAwardRecordService {

    ActivityGiftPopupResponse popup(ActivityGiftPopupRequest request);


    Boolean closePopup(ActivityGiftPopupRequest request);

    /**
     * 设置发奖标识
     *
     * @param taskId
     * @param uid
     * @param taskPeriod
     * @param expiredTime
     */
    void setAwardTimeToday(String taskId, String uid, String taskPeriod, LocalDateTime expiredTime);

    /**
     * 发奖确认
     * @param request
     * @return
     */
    Boolean awardConfirm(AwardConfirmRequest request);

    /**
     * 查询对应日期的成功发奖流水
     *
     * @param actId
     * @param taskId
     * @param uid
     * @param startDate
     * @param endDate
     * @return
     */
    List<TIrisActivityAwardRecordDO> queryIssueList(String actId,
            String taskId, String uid, Date startDate, Date endDate);

    /**
     * 查询发奖记录
     * @param uid
     * @param actId
     * @param taskId
     * @param taskRecordId
     * @return
     */
    TIrisActivityAwardRecordDO queryAwardRecord(String uid, String actId, String taskId, String taskRecordId);

    /**
     * 删除派奖上限数量记录缓存
     * @param pid
     * @param uid
     */
    void deleteInviteAwardLimitCache(String pid, String uid);

    /**
     * 递增派奖上限数量记录缓存
     * @param pid
     * @param uid
     */
    void incrInviteAwardLimitCache(String pid, String uid, String taskBizId);
}
